//
//  QuestionaireFooter.m
//  PigMarket
//
//  Created by 张敬 on 2019/8/13.
//  Copyright © 2019年 pigmarket.oc. All rights reserved.
//

#import "QuestionaireFooter.h"


@interface QuestionaireFooter()

@property (nonatomic, strong) UIButton *sumbitBtn;

@end


@implementation QuestionaireFooter

#pragma mark - lifecycle methods
- (void)setupUI
{
    [self addSubview:self.sumbitBtn];
}


- (void)setupLayout
{
    self.height = 138;
    
    {
        _sumbitBtn.size = CGSizeMake(KScreenWidth - 50, 48);
        _sumbitBtn.mj_x = 25;
        _sumbitBtn.mj_y = 45;
    }
    
}

#pragma mark - setter methods
#pragma mark - getter methods

- (UIButton *)sumbitBtn{
    
    if (!_sumbitBtn) {
        _sumbitBtn = [UIButton makeButtonWithText:@"提交" textColor:KWhiteColor font:mMediumFont(16) textAliment:1 cornerRadius:5];
        [_sumbitBtn setBackgroundImage:[UIImage imageNamed:@"btn_nomal_bg"] forState:UIControlStateNormal];
        
        @weakify(self);
        _sumbitBtn.tapBlock = ^{
            @strongify(self);
            if (self.dealSumbitBlock) {
                self.dealSumbitBlock();
            }
        };
    }
    return _sumbitBtn;
}


@end
